package demo2.AddEmployee;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.UUID;

import db.DBUtil;

public class AddEmployeeFormDAO {
	 public static void Add(String emp_id,String sex,String name,String idcard, String  birthday,String duty,String  job,
			 String depart, String tele, String time) throws SQLException{
     Connection conn = DBUtil.getConnection();
	 Statement stmt = conn.createStatement();
 	 String sql="insert into emp_info(emp_id,sex,emp_name,idcard,birthday,duty,job,department,telephone,entertime) values('"+emp_id+"','"+sex+"','"+name+"','"+idcard+"','"+birthday+"','"+duty+"','"+job+"','"+depart+"','"+tele+"','"+time+"') ";
 	 stmt.execute(sql);
 	 DBUtil.close(conn);
  }
	 
	 public void insertresult(String emp_id) throws SQLException{
		 Connection conn = DBUtil.getConnection();
		 Statement stmt = conn.createStatement();
		 String sql="insert into result(e_id) values('"+emp_id+"')";
		 stmt.execute(sql);
	 	 DBUtil.close(conn);
	 }
}
